from django.db import models

# Create your models here.

class UrlGroup(models.Model):
    groupname = models.CharField(max_length=18)

class RoleUrl(models.Model):
    name = models.CharField(max_length=18)
    url = models.CharField(max_length=32)
    group = models.ForeignKey('UrlGroup')

class Role(models.Model):
    name = models.CharField(max_length=18)
    permission = models.ForeignKey('RoleUrl')

class User(models.Model):
    user = models.CharField(max_length=18)
    passwd = models.CharField(max_length=32)
    role = models.ForeignKey('Role')